///*
// * To change this template, choose Tools | Templates
// * and open the template in the editor.
// */
//package com.google.code.jmarias.server.phases;
//
//import com.google.code.jmarias.common.Card;
//import com.google.code.jmarias.server.Player;
//import com.google.code.jmarias.common.action.AskForChoiceAction;
//import com.google.code.jmarias.common.action.DropTalonAction;
//import com.google.code.jmarias.common.action.GameAction;
//import java.util.ArrayList;
//import java.util.List;
//
///**
// *
// * @author josef
// */
//public class BadTalonDroppingPhase extends TalonDroppingPhase {
//
//    private int badPlayerIndex;
//
//    public BadTalonDroppingPhase(int badPlayerIndex) {
//        this.badPlayerIndex = badPlayerIndex;
//    }
//
//    @Override
//    public AbstractPhase processAction(GameAction action) {
//        if (isSameAction(DropTalonAction.class, action)) {
//            return processDropTalonAction((DropTalonAction) action);
//        }
//        return null;
//    }
//
//    private AbstractPhase processDropTalonAction(DropTalonAction action) {
//        List<Card> talon = new ArrayList<Card>();
//        for (Card card : action.getTalon()) {
//            talon.add(card);
//        }
//        table.setTalon(talon);
//        Player[] players = table.getPlayers();
//        players[badPlayerIndex].removeCards(talon);
//        //nasledujici akce je posilana, aby se klient dozvedel, ze je na case hrat dal
//        table.getClients().get(0).sendMessage(new AskForChoiceAction(1));
//        return new ChooseGamePhase(badPlayerIndex);
//    }
//}
